import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'
export const constantRoutes = [{
		path: '/login',
		component:resolve=>require(['@/views/login/index'],resolve),
		hidden: true
	},

	{
		path: '/404',
		component:resolve=>require(['@/views/404'],resolve),
		hidden: true
	},
	{
		path: '/index',
		component: Layout,
		redirect: '/index/index',
		meta: {
			title: '首页',
			icon: 'el-icon-s-home'
		},
		children: [{
			path: 'index',
			name: 'index',
			component:resolve=>require(['@/views/index/index'],resolve),
			meta: {
				activeMenu: '/index'
			}
		}]
	},
	{
		path: '/systemManagement',
		component: Layout,
		redirect: '/systemManagement/corporateArchitecture',
		meta: {
			title: '系统管理',
			icon: 'xt_icon',
		},
		children: [
			{
				path: '/corporateArchitecture',
				name: 'corporateArchitecture',
				component:resolve=>require(['@/views/systemManagement/corporateArchitecture'],resolve),
				meta: {
					title: '公司架构',
					activeMenu: '/corporateArchitecture'
				},
			},
			{
				path: '/staffManagement',
				name: 'staffManagement',
				component:resolve=>require(['@/views/systemManagement/staffManagement'],resolve),
				meta: {
					title: '员工管理',
					activeMenu: '/staffManagement'
				},
			},
			{
				path: '/authorityManagement',
				name: 'authorityManagement',
				component:resolve=>require(['@/views/systemManagement/authorityManagement'],resolve),
				meta: {
					title: '岗位权限管理',
					activeMenu: '/authorityManagement'
                },
				children: [
					{
						hidden: true,
						path: '/jurisdiction',
						name: 'jurisdiction',
						component:resolve=>require(['@/views/systemManagement/jurisdiction'],resolve),
						meta: {
							title: '岗位权限分配',
							activeMenu: '/authorityManagement'
						}
				    }
				]
            },
			{
				path: '/TypeOfWork',
				name: 'TypeOfWork',
				component:resolve=>require(['@/views/systemManagement/TypeOfWork'],resolve),
				meta: {
					title: '工作类别',
					activeMenu: '/TypeOfWork'
				},
			},
		]
	},
	{
		path: '/strative',
		component: Layout,
		redirect: '/strative/addAdministrative',
		meta: {
			title: '行政管理',
			icon: 'xz_icon',
		},
		children: [
            {
				path: '/addAdministrative',
				name: 'addAdministrative',
				component:resolve=>require(['@/views/strative/addAdministrative'],resolve),
				meta: {
					title: '行政申请',
					activeMenu: '/addAdministrative'
				},
				children: [
					{
						hidden: true,
						path: '/receptionApply',
						name: 'receptionApply',
						component:resolve=>require(['@/views/strative/receptionApply'],resolve),
						meta: {
							title: '接待申请',
							activeMenu: '/addAdministrative'
						}
				    }
				]
            },
            {
				path: '/facilitiesMaintenance',
				name: 'facilitiesMaintenance',
				component:resolve=>require(['@/views/strative/facilitiesMaintenance'],resolve),
				meta: {
					title: '设备类维护',
					activeMenu: '/facilitiesMaintenance'
				},
				children: [
                    {
						hidden: true,
						path: '/maintain',
						name: 'maintain',
						component:resolve=>require(['@/views/strative/maintain'],resolve),
						meta: {
							title: 'IT/设备类维护申请',
							activeMenu: '/facilitiesMaintenance'
						}
				    }
				]
            },
            {
				path: '/personnelItems',
				name: 'personnelItems',
				component:resolve=>require(['@/views/strative/personnelItems'],resolve),
				meta: {
					title: '人员物品放行',
					activeMenu: '/personnelItems'
				},
                children: [
                    {
						hidden: true,
						path: '/requestRelease',
						name: 'requestRelease',
						component:resolve=>require(['@/views/strative/requestRelease'],resolve),
						meta: {
							title: '人员/物品放行申请',
							activeMenu: '/personnelItems'
						}
				    }
				]
            },
            {
				path: '/management8s',
				name: 'management8s',
				component:resolve=>require(['@/views/strative/management8s'],resolve),
				meta: {
					title: '8S管理',
					activeMenu: '/management8s'
				},
                children: [
                    {
						hidden: true,
						path: '/details8S',
						name: 'details8S',
						component:resolve=>require(['@/views/strative/details8S'],resolve),
						meta: {
							title: '8S管理',
							activeMenu: '/personnelItems'
						}
				    }
				]
            },
            {
				path: '/meetingManagement',
				name: 'meetingManagement',
				component:resolve=>require(['@/views/strative/meetingManagement'],resolve),
				meta: {
					title: '会议管理',
					activeMenu: '/meetingManagement'
				},
                children: [
                    {
						hidden: true,
						path: '/meetingType',
						name: 'meetingType',
						component:resolve=>require(['@/views/strative/meetingType'],resolve),
						meta: {
							title: '会议类型管理',
							activeMenu: '/meetingManagement'
						}
				    }
				]
            }
		]
	},

	{
		path: '/businessAM',
		component: Layout,
		redirect: '/businessAM/kehuXX',
		meta: {
			title: '商务管理',
			icon: 'sw_icon',
		},
		children: [
			{
				path: 'kehuXX',
				name: 'kehuXX',
				component:resolve=>require(['@/views/businessAM/kehuXX'],resolve),
				meta: {
					title: '客户信息',
					activeMenu: '/businessAM/kehuXX'
				},
				children: [
					{
						hidden: true,
						path: 'subpageKH',
						name: 'subpageKH',
						component:resolve=>require(['@/views/businessAM/subpageKH'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/kehuXX'
						}
				    },
				],
			},
			{
				path: 'xuquiXM',
				name: 'xuquiXM',
				component:resolve=>require(['@/views/businessAM/xuquiXM'],resolve),
				meta: {
					title: '项目需求',
					activeMenu: '/businessAM/xuquiXM'
				},
				children: [
					{
						hidden: true,
						path: 'subpageXQ',
						name: 'subpageXQ',
						component:resolve=>require(['@/views/businessAM/subpageXQ'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/xuquiXM'
						}
				    },
				],
			},
			{
				path: 'chengbenXM',
				name: 'chengbenXM',
				component:resolve=>require(['@/views/businessAM/chengbenXM'],resolve),
				meta: {
					title: '项目成本预核算',
					activeMenu: '/businessAM/chengbenXM'
				},
				children: [
					{
						hidden: true,
						path: 'subpageCB',
						name: 'subpageCB',
						component:resolve=>require(['@/views/businessAM/subpageCB'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/chengbenXM'
						}
				    },
				],
			},
			{
				path: 'baojiaXM',
				name: 'baojiaXM',
				component:resolve=>require(['@/views/businessAM/baojiaXM'],resolve),
				meta: {
					title: '项目报价',
					activeMenu: '/businessAM/baojiaXM'
				},
				children: [
					{
						hidden: true,
						path: 'subpageBJ',
						name: 'subpageBJ',
						component:resolve=>require(['@/views/businessAM/subpageBJ'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/baojiaXM'
						}
				    },
				],
			},
			{
				path: 'hetongXM',
				name: 'hetongXM',
				component:resolve=>require(['@/views/businessAM/hetongXM'],resolve),
				meta: {
					title: '项目合同',
					activeMenu: '/businessAM/hetongXM'
				},
				children: [
					{
						hidden: true,
						path: 'subpageHT',
						name: 'subpageHT',
						component:resolve=>require(['@/views/businessAM/subpageHT'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/hetongXM'
						}
				    },
				],
			},
			{
				path: 'renwushuXM',
				name: 'renwushuXM',
				component:resolve=>require(['@/views/businessAM/renwushuXM'],resolve),
				meta: {
					title: '项目任务书',
					activeMenu: '/businessAM/renwushuXM'
				},
				children: [
					{
						hidden: true,
						path: 'subpageRW',
						name: 'subpageRW',
						component:resolve=>require(['@/views/businessAM/subpageRW'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/renwushuXM'
						}
				    },
				],
			},
			{
				path: 'xuqiubgXm',
				name: 'xuqiubgXm',
				component:resolve=>require(['@/views/businessAM/xuqiubgXm'],resolve),
				meta: {
					title: '项目需求变更',
					activeMenu: '/businessAM/xuqiubgXm'
				},
				children: [
					{
						hidden: true,
						path: 'subpageBG',
						name: 'subpageBG',
						component:resolve=>require(['@/views/businessAM/subpageBG'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/xuqiubgXm'
						}
				    },
				],
			},
			{
				path: 'yewuPD',
				name: 'yewuPD',
				component:resolve=>require(['@/views/businessAM/yewuPD'],resolve),
				meta: {
					title: '业务排单表',
					activeMenu: '/businessAM/yewuPD'
				},
				children: [
					{
						hidden: true,
						path: 'subpageYW',
						name: 'subpageYW',
						component:resolve=>require(['@/views/businessAM/subpageYW'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/yewuPD'
						}
				    },
				],
			},
			{
				path: 'xiaoshouJH',
				name: 'xiaoshouJH',
				component:resolve=>require(['@/views/businessAM/xiaoshouJH'],resolve),
				meta: {
					title: '销售计划',
					activeMenu: '/businessAM/xiaoshouJH'
				},
				children: [
					{
						hidden: true,
						path: 'subpageXS',
						name: 'subpageXS',
						component:resolve=>require(['@/views/businessAM/subpageXS'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/xiaoshouJH'
						}
				    },
				],
			},
			{
				path: 'chuchaiJH',
				name: 'chuchaiJH',
				component:resolve=>require(['@/views/businessAM/chuchaiJH'],resolve),
				meta: {
					title: '出差计划',
					activeMenu: '/businessAM/chuchaiJH'
				},
				children: [
					{
						hidden: true,
						path: 'subpageCC',
						name: 'subpageCC',
						component:resolve=>require(['@/views/businessAM/subpageCC'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/chuchaiJH'
						}
				    },
				],
			},
			{
				path: 'kaipiaoJH',
				name: 'kaipiaoJH',
				component:resolve=>require(['@/views/businessAM/kaipiaoJH'],resolve),
				meta: {
					title: '开票回款计划',
					activeMenu: '/businessAM/kaipiaoJH'
				},
				children: [
					{
						hidden: true,
						path: 'subpageHK',
						name: 'subpageHK',
						component:resolve=>require(['@/views/businessAM/subpageHK'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/kaipiaoJH'
						}
				    },
				],
			},
			{
				path: 'feiyongSQ',
				name: 'feiyongSQ',
				component:resolve=>require(['@/views/businessAM/feiyongSQ'],resolve),
				meta: {
					title: '费用申请',
					activeMenu: '/businessAM/feiyongSQ'
				},
				children: [
					{
						hidden: true,
						path: 'subpageFY',
						name: 'subpageFY',
						component:resolve=>require(['@/views/businessAM/subpageFY'],resolve),
						meta: {
							title: '',
							activeMenu: '/businessAM/feiyongSQ'
						}
				    },
				],
			},
		]
	},
	{
		path: '/procurement',
		component: Layout,
		redirect: '/procurement/shenqingCG',
		meta: {
			title: '采购管理',
			icon: 'el-icon-box'
		},
		children: [{
			path: 'shenqingCG',
			name: 'shenqingCG',
			component:resolve=>require(['@/views/procurement/shenqingCG'],resolve),
			meta: {
				title: '采购申请',
				activeMenu: '/procurement/shenqingCG'
			}
		},
		{
			path: 'liebiaoCG',
			name: 'liebiaoCG',
			component:resolve=>require(['@/views/procurement/liebiaoCG'],resolve),
			meta: {
				title: '采购申请列表',
				activeMenu: '/procurement/liebiaoCG'
			}
		},
		{
			path: 'xunjiaCG',
			name: 'xunjiaCG',
			component:resolve=>require(['@/views/procurement/xunjiaCG'],resolve),
			meta: {
				title: '物料采购询价单',
				activeMenu: '/procurement/xunjiaCG'
			}
		},
		{
			path: 'dingdanCG',
			name: 'dingdanCG',
			component:resolve=>require(['@/views/procurement/dingdanCG'],resolve),
			meta: {
				title: '采购订单',
				activeMenu: '/procurement/dingdanCG'
			}
		},
		{
			path: 'jinduGZ',
			name: 'jinduGZ',
			component:resolve=>require(['@/views/procurement/jinduGZ'],resolve),
			meta: {
				title: '采购进度跟踪表',
				activeMenu: '/procurement/jinduGZ'
			}
		},
		{
			path: 'fukuanJH',
			name: 'fukuanJH',
			component:resolve=>require(['@/views/procurement/fukuanJH'],resolve),
			meta: {
				title: '付款计划',
				activeMenu: '/procurement/fukuanJH'
			}
		},
		{
			path: 'guanliGY',
			name: 'guanliGY',
			component:resolve=>require(['@/views/procurement/guanliGY'],resolve),
			meta: {
				title: '供应商管理',
				activeMenu: '/procurement/guanliGY'
			}
		},
		{
			path: 'shijianFJ',
			name: 'shijianFJ',
			component:resolve=>require(['@/views/procurement/shijianFJ'],resolve),
			meta: {
				title: '供应商放假时间管理',
				activeMenu: '/procurement/shijianFJ'
			}
		}]
	},



	{
		path: '/personnelManagement',
		component: Layout,
		redirect: '/personnelManagement/attendance',
		meta: {
			title: '人事管理',
			icon: 'xt_icon',
		},
		children: [
			{
				path: 'attendance',
				name: 'attendance',
				component:resolve=>require(['@/views/personnelManagement/attendance'],resolve),
				meta: {
					title: '考勤管理',
					activeMenu: '/personnelManagement/attendance'
				},
			},
			{
				path: 'overtime',
				name: 'overtime',
				component:resolve=>require(['@/views/personnelManagement/overtime'],resolve),
				meta: {
					title: '加班申请',
					activeMenu: '/personnelManagement/overtime'
				},
				children: [
					{
						hidden: true,
						path: 'overtimeApply',
						name: 'overtimeApply',
						component:resolve=>require(['@/views/personnelManagement/overtimeApply'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/overtime'
						}
				    },
				],
			},
			{
				path: 'takeWorking',
				name: 'takeWorking',
				component:resolve=>require(['@/views/personnelManagement/takeWorking'],resolve),
				meta: {
					title: '调休申请',
					activeMenu: '/personnelManagement/takeWorking'
				},
				children: [
					{
						hidden: true,
						path: 'takeWorkingApply',
						name: 'takeWorkingApply',
						component:resolve=>require(['@/views/personnelManagement/takeWorkingApply'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/takeWorking'
						}
				    },
				],
			},
			{
				path: 'applicationForLeave',
				name: 'applicationForLeave',
				component:resolve=>require(['@/views/personnelManagement/applicationForLeave'],resolve),
				meta: {
					title: '请假申请',
					activeMenu: '/personnelManagement/applicationForLeave'
				},
				children: [
					{
						hidden: true,
						path: 'leaveApply',
						name: 'leaveApply',
						component:resolve=>require(['@/views/personnelManagement/leaveApply'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/applicationForLeave'
						}
				    },
				],
			},
			{
				path: 'evection',
				name: 'evection',
				component:resolve=>require(['@/views/personnelManagement/evection'],resolve),
				meta: {
					title: '出差申请',
					activeMenu: '/personnelManagement/evection'
				},
				children: [
					{
						hidden: true,
						path: 'travelApply',
						name: 'travelApply',
						component:resolve=>require(['@/views/personnelManagement/travelApply'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/evection'
						}
				    },
				],
			},
			{
				path: 'job',
				name: 'job',
				component:resolve=>require(['@/views/personnelManagement/job'],resolve),
				meta: {
					title: '招聘申请',
					activeMenu: '/personnelManagement/job'
				},
				children: [
					{
						hidden: true,
						path: 'jobApply',
						name: 'jobApply',
						component:resolve=>require(['@/views/personnelManagement/jobApply'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/job'
						}
				    },
				],
			},
			{
				path: 'record',
				name: 'record',
				component:resolve=>require(['@/views/personnelManagement/record'],resolve),
				meta: {
					title: '人员档案管理',
					activeMenu: '/personnelManagement/record'
				},
			},
			{
				path: 'grade',
				name: 'grade',
				component:resolve=>require(['@/views/personnelManagement/grade'],resolve),
				meta: {
					title: '等级管理',
					activeMenu: '/personnelManagement/grade'
				},
			},
			{
				path: 'personnelInspection',
				name: 'personnelInspection',
				component:resolve=>require(['@/views/personnelManagement/personnelInspection'],resolve),
				meta: {
					title: '人员考核',
					activeMenu: '/personnelManagement/personnelInspection'
				},
				children: [
					{
						hidden: true,
						path: 'inspectionType',
						name: 'inspectionType',
						component:resolve=>require(['@/views/personnelManagement/inspectionType'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/personnelInspection'
						}
				    },
				],
			},
			{
				path: 'rewards',
				name: 'rewards',
				component:resolve=>require(['@/views/personnelManagement/rewards'],resolve),
				meta: {
					title: '奖罚通报',
					activeMenu: '/personnelManagement/rewards'
				},
				children: [
					{
						hidden: true,
						path: 'addRewards',
						name: 'addRewards',
						component:resolve=>require(['@/views/personnelManagement/addRewards'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/rewards'
						}
				    },
				],
			},
			{
				path: 'welfare',
				name: 'welfare',
				component:resolve=>require(['@/views/personnelManagement/welfare'],resolve),
				meta: {
					title: '员工晋升福利申请',
					activeMenu: '/personnelManagement/welfare'
				},
				children: [
					{
						hidden: true,
						path: 'Addwelfare',
						name: 'Addwelfare',
						component:resolve=>require(['@/views/personnelManagement/Addwelfare'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/welfare'
						}
				    },
				],
			},
			{
				path: 'transfer',
				name: 'transfer',
				component:resolve=>require(['@/views/personnelManagement/transfer'],resolve),
				meta: {
					title: '入职离职调动',
					activeMenu: '/personnelManagement/transfer'
				},
				children: [
					{
						hidden: true,
						path: 'addTransfer',
						name: 'addTransfer',
						component:resolve=>require(['@/views/personnelManagement/addTransfer'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/transfer'
						}
				    },
				],
			},
			{
				path: 'trainingPlan',
				name: 'trainingPlan',
				component:resolve=>require(['@/views/personnelManagement/trainingPlan'],resolve),
				meta: {
					title: '培训计划',
					activeMenu: '/personnelManagement/trainingPlan'
				},
				children: [
					{
						hidden: true,
						path: 'addTrainingPlan',
						name: 'addTrainingPlan',
						component:resolve=>require(['@/views/personnelManagement/addTrainingPlan'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/trainingPlan'
						}
				    },
				],
			},
			{
				path: 'daily',
				name: 'daily',
				component:resolve=>require(['@/views/personnelManagement/daily'],resolve),
				meta: {
					title: '日报',
					activeMenu: '/personnelManagement/daily'
				},
			},
			{
				path: 'weekly',
				name: 'weekly',
				component:resolve=>require(['@/views/personnelManagement/weekly'],resolve),
				meta: {
					title: '周报月报年报',
					activeMenu: '/personnelManagement/weekly'
				},
				children: [
					{
						hidden: true,
						path: 'addWeekly',
						name: 'addWeekly',
						component:resolve=>require(['@/views/personnelManagement/addWeekly'],resolve),
						meta: {
							title: '',
							activeMenu: '/personnelManagement/weekly'
						}
				    },
				],
			},
		]
	},

	{
		path: '/project',
		component: Layout,
		redirect: '/index/index',
		meta: {
			title: '项目管理',
			icon: 'el-icon-s-home'
		},
		children: [{
			path: '/schedule',
			name: 'schedule',
			component:resolve=>require(['@/views/project/schedule/schedule'],resolve),
			meta: {
                title: '项目进度管理',
				activeMenu: '/schedule'
			}
		},{
			path: '/itemPartsList',
			name: 'itemPartsList',
			component:resolve=>require(['@/views/project/itemPartsList/itemPartsList'],resolve),
			meta: {
                title: '项目零件清单管理',
				activeMenu: '/itemPartsList'
			}
		},{
			path: '/participant',
			name: 'participant',
			component:resolve=>require(['@/views/project/participant/participant'],resolve),
			meta: {
                title: '项目参与人',
				activeMenu: '/participant'
			}
		},{
			path: '/colourFabricList',
			name: 'colourFabricList',
			component:resolve=>require(['@/views/project/colourFabricList/colourFabricList'],resolve),
			meta: {
                title: '色彩面料清单',
				activeMenu: '/colourFabricList'
			}
		},{
			path: '/abnormalProblemLog',
			name: 'abnormalProblemLog',
			component:resolve=>require(['@/views/project/abnormalProblemLog/abnormalProblemLog'],resolve),
			meta: {
                title: '项目异常问题记录',
				activeMenu: '/abnormalProblemLog'
			}
		},{
			path: '/issueTracking',
			name: 'issueTracking',
			component:resolve=>require(['@/views/project/issueTracking/issueTracking'],resolve),
			meta: {
                title: '项目问题跟踪',
				activeMenu: '/issueTracking'
			}
		},{
			path: '/dataAcceptance',
			name: 'issueTracking',
			component:resolve=>require(['@/views/project/dataAcceptance/dataAcceptance'],resolve),
			meta: {
                title: '项目数据接收记录',
				activeMenu: '/dataAcceptance'
			}
		},{
			path: '/partsReceived',
			name: 'partsReceived',
			component:resolve=>require(['@/views/project/partsReceived/partsReceived'],resolve),
			meta: {
                title: '项目零件接收记录',
				activeMenu: '/partsReceived'
			}
		},{
			path: '/connect',
			name: 'connect',
			component:resolve=>require(['@/views/project/connect/connect'],resolve),
			meta: {
                title: '项目文件物品接收记录',
				activeMenu: '/connect'
			}
		},{
			path: '/progressRepor',
			name: 'progressRepor',
			component:resolve=>require(['@/views/project/progressRepor/progressRepor'],resolve),
			meta: {
                title: '项目进度报告',
				activeMenu: '/progressRepor'
			}
		},{
			path: '/itemDeliveryNote',
			name: 'itemDeliveryNote',
			component:resolve=>require(['@/views/project/itemDeliveryNote/itemDeliveryNote'],resolve),
			meta: {
                title: '项目送货单',
				activeMenu: '/itemDeliveryNote'
			}
		},{
			path: '/acceptanceSheet',
			name: 'acceptanceSheet',
			component:resolve=>require(['@/views/project/acceptanceSheet/acceptanceSheet'],resolve),
			meta: {
                title: '项目验收单',
				activeMenu: '/acceptanceSheet'
			}
		},{
			path: '/taskAssignment',
			name: 'taskAssignment',
			component:resolve=>require(['@/views/project/taskAssignment/taskAssignment'],resolve),
			meta: {
                title: '任务指派',
				activeMenu: '/taskAssignment'
			}
		}]
	},

	{
		path: '/orderManagement',
		component: Layout,
		redirect: '/orderManagement/productList',
		meta: {
			title: '生产管理',
			icon: 'sc_icon',
		},
		children: [
			{
				path: 'orderList',
				name: 'orderList',
				component:resolve=>require(['@/views/orderManagement/orderList'],resolve),
				meta: {
					title: '订单列表',
					activeMenu: '/orderManagement/orderList'
				},
				children: [{
					hidden: true,
					path: 'orderDetail',
					name: 'orderDetail',
					component:resolve=>require(['@/views/orderManagement/orderDetail'],resolve),
					meta: {
						title: '详情',
						activeMenu: '/orderManagement/orderList'
					}
				}]
			},
			{
				path: 'afterSaleList',
				name: 'afterSaleList',
				component:resolve=>require(['@/views/orderManagement/afterSaleList'],resolve),
				meta: {
					title: '售后列表',
					activeMenu: '/orderManagement/afterSaleList'
				},
				children: [{
					hidden: true,
					path: 'afterSaleDetail',
					name: 'afterSaleDetail',
					component:resolve=>require(['@/views/orderManagement/afterSaleDetail'],resolve),
					meta: {
						title: '详情',
						activeMenu: '/orderManagement/afterSaleList'
					}
				}]
			},
		]
	},


	{
		path: '/userManagement',
		component: Layout,
		redirect: '/userManagement/introvert',
		meta: {
			title: '内外协管理',
			icon: 'gl_icon',
		},
		children: [
			{
				path: 'introvert',
				name: 'introvert',
				component:resolve=>require(['@/views/userManagement/introvert'],resolve),
				meta: {
					title: '内协申请',
					activeMenu: '/userManagement/introvert'
				},
			},
			{
				path: 'outsourcing',
				name: 'outsourcing',
				component:resolve=>require(['@/views/userManagement/outsourcing'],resolve),
				meta: {
					title: '外协申请',
					activeMenu: '/userManagement/outsourcing'
				},
			},
			{
				path: 'outsourcingList',
				name: 'outsourcingList',
				component:resolve=>require(['@/views/userManagement/outsourcingList'],resolve),
				meta: {
					title: '外协申请列表',
					activeMenu: '/userManagement/outsourcingList'
				},
			},
			{
				path: 'inquiryList',
				name: 'inquiryList',
				component:resolve=>require(['@/views/userManagement/inquiryList'],resolve),
				meta: {
					title: '外协询价单',
					activeMenu: '/userManagement/inquiryList'
				},
			},
			{
				path: 'outsourceOrder',
				name: 'outsourceOrder',
				component:resolve=>require(['@/views/userManagement/outsourceOrder'],resolve),
				meta: {
					title: '外协订单',
					activeMenu: '/userManagement/outsourceOrder'
				},
			},
			{
				path: 'progressTracking',
				name: 'progressTracking',
				component:resolve=>require(['@/views/userManagement/progressTracking'],resolve),
				meta: {
					title: '外协进度跟踪表',
					activeMenu: '/userManagement/progressTracking'
				},
			},
			{
				path: 'paymentSchedule',
				name: 'paymentSchedule',
				component:resolve=>require(['@/views/userManagement/paymentSchedule'],resolve),
				meta: {
					title: '付款计划',
					activeMenu: '/userManagement/paymentSchedule'
				},
			},
			{
				path: 'supplierManagement',
				name: 'supplierManagement',
				component:resolve=>require(['@/views/userManagement/supplierManagement'],resolve),
				meta: {
					title: '供应商管理',
					activeMenu: '/userManagement/supplierManagement'
				},
			},
			{
				path: 'holidayArrangement',
				name: 'holidayArrangement',
				component:resolve=>require(['@/views/userManagement/holidayArrangement'],resolve),
				meta: {
					title: '供应商放假时间管理',
					activeMenu: '/userManagement/holidayArrangement'
				},
			},
		]
	},

	{
		path: '/financialManagement',
		component: Layout,
		redirect: '/financialManagement/invoiceApply',
		name: 'financialManagement',
		meta: {
			title: '财务管理',
			icon: 'cw_icon'
		},
		children: [
			{
				path: 'invoiceApply',
				name: 'indinvoiceApplyexImg',
				component:resolve=>require(['@/views/financialManagement/invoiceApply'],resolve),
				meta: {
					title: '开票申请',
					activeMenu: '/financialManagement/invoiceApply',
				},
			},
			{
				path: 'moneyApply',
				name: 'moneyApply',
				component:resolve=>require(['@/views/financialManagement/moneyApply'],resolve),
				meta: {
					title: '费用申请',
					activeMenu: '/financialManagement/moneyApply',
				},
			},
			{
				path: 'capitalDaily',
				name: 'capitalDaily',
				component:resolve=>require(['@/views/financialManagement/capitalDaily'],resolve),
				meta: {
					title: '资金日报',
					activeMenu: '/financialManagement/capitalDaily',
				},
			},
			{
				path: 'commission',
				name: 'commission',
				component:resolve=>require(['@/views/financialManagement/commission'],resolve),
				meta: {
					title: '业务提成',
					activeMenu: '/financialManagement/commission',
				},
			},
			{
				path: 'yearlyReport',
				name: 'yearlyReport',
				component:resolve=>require(['@/views/financialManagement/yearlyReport'],resolve),
				meta: {
					title: '年底分红',
					activeMenu: '/financialManagement/yearlyReport',
				},
			},
			{
				path: 'orderCheck',
				name: 'orderCheck',
				component:resolve=>require(['@/views/financialManagement/orderCheck'],resolve),
				meta: {
					title: '订单考核',
					activeMenu: '/financialManagement/orderCheck',
				},
			},
			{
				path: 'salaryHistory',
				name: 'salaryHistory',
				component:resolve=>require(['@/views/financialManagement/salaryHistory'],resolve),
				meta: {
					title: '薪资情况',
					activeMenu: '/financialManagement/salaryHistory',
				},
			},
			{
				path: 'productionValue',
				name: 'productionValue',
				component:resolve=>require(['@/views/financialManagement/productionValue'],resolve),
				meta: {
					title: '生产产值表',
					activeMenu: '/financialManagement/productionValue',
				},
			},
			{
				path: 'financialBudget',
				name: 'financialBudget',
				component:resolve=>require(['@/views/financialManagement/financialBudget'],resolve),
				meta: {
					title: '财务预算',
					activeMenu: '/financialManagement/financialBudget',
				},
			},
			{
				path: 'financialStatement',
				name: 'financialStatement',
				component:resolve=>require(['@/views/financialManagement/financialStatement'],resolve),
				meta: {
					title: '财务报表',
					activeMenu: '/financialStatement',
				},
				children: [
					{
						hidden: true,
						path: 'totalAccount',
						name: 'totalAccount',
						component:resolve=>require(['@/views/financialManagement/financialStatement/totalAccount'],resolve),
						meta: {
							title: '总账目',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'costAnalysisSheet',
						name: 'costAnalysisSheet',
						component:resolve=>require(['@/views/financialManagement/financialStatement/costAnalysisSheet'],resolve),
						meta: {
							title: '成本费用表',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'financialAnalysisSheet',
						name: 'financialAnalysisSheet',
						component:resolve=>require(['@/views/financialManagement/financialStatement/financialAnalysisSheet'],resolve),
						meta: {
							title: '财务分析表',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'outputTable',
						name: 'outputTable',
						component:resolve=>require(['@/views/financialManagement/financialStatement/outputTable'],resolve),
						meta: {
							title: '产值表',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'administrationExpense',
						name: 'administrationExpense',
						component:resolve=>require(['@/views/financialManagement/financialStatement/administrationExpense'],resolve),
						meta: {
							title: '管理费用',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'operatingExpenses',
						name: 'operatingExpenses',
						component:resolve=>require(['@/views/financialManagement/financialStatement/operatingExpenses'],resolve),
						meta: {
							title: '营业费用',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'costOfProduction',
						name: 'costOfProduction',
						component:resolve=>require(['@/views/financialManagement/financialStatement/costOfProduction'],resolve),
						meta: {
							title: '生产成本',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'prepaidAccount',
						name: 'prepaidAccount',
						component:resolve=>require(['@/views/financialManagement/financialStatement/prepaidAccount'],resolve),
						meta: {
							title: '预付账款',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'receivables',
						name: 'receivables',
						component:resolve=>require(['@/views/financialManagement/financialStatement/receivables'],resolve),
						meta: {
							title: '应收账款',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'accountsPayable',
						name: 'accountsPayable',
						component:resolve=>require(['@/views/financialManagement/financialStatement/accountsPayable'],resolve),
						meta: {
							title: '应付账款',
							activeMenu: '/financialStatement'
						}
				    },
					{
						hidden: true,
						path: 'incomeStatement',
						name: 'incomeStatement',
						component:resolve=>require(['@/views/financialManagement/financialStatement/incomeStatement'],resolve),
						meta: {
							title: '利润表',
							activeMenu: '/financialStatement'
						}
				    },
				],
			},
		]
	},

	{
		path: '/storeManagement',
		component: Layout,
		redirect: '/acquisitionApplication',
		name: 'storeManagement',
		meta: {
			title: '仓库管理',
			icon: 'ck_icon'
		},
		children: [
			{
				path: '/acquisitionApplication',
				name: 'acquisitionApplication',
				component:resolve=>require(['@/views/storeManagement/acquisitionApplication'],resolve),
				meta: {
					title: '领料申请',
					activeMenu: '/acquisitionApplication',
				},
				children: [
					{
						hidden: true,
						path: 'material',
						name: 'material',
						component:resolve=>require(['@/views/storeManagement/material'],resolve),
						meta: {
							title: '',
							activeMenu: '/acquisitionApplication'
						}
				    },
					{
						hidden: true,
						path: 'materialDetails',
						name: 'materialDetails',
						component:resolve=>require(['@/views/storeManagement/materialDetails'],resolve),
						meta: {
							title: '',
							activeMenu: '/storeManagement/acquisitionApplication'
						}
				    }
				],
			},
			{
				path: '/delivery',
				name: 'delivery',
				component:resolve=>require(['@/views/storeManagement/delivery'],resolve),
				meta: {
					title: '出库',
					activeMenu: '/delivery',
                },
                children: [
					{
						hidden: true,
						path: '/materialOutbound',
						name: 'materialOutbound',
						component:resolve=>require(['@/views/storeManagement/materialOutbound'],resolve),
						meta: {
							title: '物料出库',
							activeMenu: '/materialOutbound'
						}
				    }
				],
			},
			{
				path: '/putInStorage',
				name: 'putInStorage',
				component:resolve=>require(['@/views/storeManagement/putInStorage'],resolve),
				meta: {
					title: '入库',
					activeMenu: '/putInStorage',
                },
                children: [
					{
						hidden: true,
						path: '/materialsPut',
						name: 'materialsPut',
						component:resolve=>require(['@/views/storeManagement/materialsPut'],resolve),
						meta: {
							title: '物料入库',
							activeMenu: '/putInStorage'
						}
				    }
				],
			},
			{
				path: 'materialInventory',
				name: 'materialInventory',
				component:resolve=>require(['@/views/storeManagement/materialInventory'],resolve),
				meta: {
					title: '物料盘点',
					activeMenu: '/storeManagement/materialInventory',
                }
			},
			{
				path: 'runningStock',
				name: 'runningStock',
				component:resolve=>require(['@/views/storeManagement/runningStock'],resolve),
				meta: {
					title: '常备物料库存表',
					activeMenu: '/storeManagement/runningStock',
                }
			},
			{
				path: 'toolInventory',
				name: 'toolInventory',
				component:resolve=>require(['@/views/storeManagement/toolInventory'],resolve),
				meta: {
					title: '塑料刀具类库存表',
					activeMenu: '/storeManagement/toolInventory',
                }
			},
			{
				path: 'rawMaterial',
				name: 'rawMaterial',
				component:resolve=>require(['@/views/storeManagement/rawMaterial'],resolve),
				meta: {
					title: '原材料库存清单',
					activeMenu: '/storeManagement/rawMaterial',
                }
			},
			{
				path: 'fixedAssetsManagement',
				name: 'fixedAssetsManagement',
				component:resolve=>require(['@/views/storeManagement/fixedAssetsManagement'],resolve),
				meta: {
					title: '固定资产管理',
					activeMenu: '/storeManagement/fixedAssetsManagement',
                }
			},
			{
				path: 'materialRecycling',
				name: 'materialRecycling',
				component:resolve=>require(['@/views/storeManagement/materialRecycling'],resolve),
				meta: {
					title: '物料回收',
					activeMenu: '/storeManagement/materialRecycling',
                }
			},//
			{
				path: 'materialScrap',
				name: 'materialScrap',
				component:resolve=>require(['@/views/storeManagement/materialScrap'],resolve),
				meta: {
					title: '物料报废',
					activeMenu: '/storeManagement/materialScrap',
                }
			},
			{
				// 
				path: 'oldForNewService',
				name: 'oldForNewService',
				component:resolve=>require(['@/views/storeManagement/oldForNewService'],resolve),
				meta: {
					title: '以旧换新',
					activeMenu: '/storeManagement/oldForNewService',
                }
			},
		]
	},
	{
		path: '/knowledge',
		component: Layout,
		redirect: '/knowledge/gongyi',
		name: 'knowledge',
		meta: {
			title: '知识城邦',
			icon: 'zs_icon'
		},
		children: [
			{
				path: 'gongyi',
				name: 'gongyi',
				component:resolve=>require(['@/views/knowledge/gongyi'],resolve),
				meta: {
					title: '工艺流程',
					activeMenu: '/knowledge/gongyi',
				},
			},
			{
				path: 'yanshou',
				name: 'yanshou',
				component:resolve=>require(['@/views/knowledge/yanshou'],resolve),
				meta: {
					title: '验收标准',
					activeMenu: '/knowledge/yanshou',
				},
			},
			{
				path: 'gaishan',
				name: 'gaishan',
				component:resolve=>require(['@/views/knowledge/gaishan'],resolve),
				meta: {
					title: '改善建议',
					activeMenu: '/knowledge/gaishan',
				},
			},
			{
				path: 'zixun',
				name: 'zixun',
				component:resolve=>require(['@/views/knowledge/zixun'],resolve),
				meta: {
					title: '行业资讯',
					activeMenu: '/knowledge/zixun',
				},
			},
			{
				path: 'zhangcheng',
				name: 'zhangcheng',
				component:resolve=>require(['@/views/knowledge/zhangcheng'],resolve),
				meta: {
					title: '公司章程',
					activeMenu: '/knowledge/zhangcheng',
				},
			},
		]
	},
	{
		path: '/basicSetup',
		component: Layout,
		redirect: '/basicSetup/us',
		name: 'basicSetup',
		meta: {
			title: '消息通知',
			icon: 'message'
		},
		children: [
			{
				path: 'indexImg',
				name: 'indexImg',
				component:resolve=>require(['@/views/basicSetup/indexImg'],resolve),
				meta: {
					title: '首页封面图',
					activeMenu: '/basicSetup/indexImg',
				},
			},
			{
				path: 'us',
				name: 'us',
				component:resolve=>require(['@/views/basicSetup/us'],resolve),
				meta: {
					title: '关于我们',
					activeMenu: '/basicSetup/us',
				},
			},
			{
				path: 'returnPolicy',
				name: 'returnPolicy',
				component:resolve=>require(['@/views/basicSetup/returnPolicy'],resolve),
				meta: {
					title: '退货政策',
					activeMenu: '/basicSetup/returnPolicy',
				},
			},
			{
				path: 'contactCustomerService',
				name: 'contactCustomerService',
				component:resolve=>require(['@/views/basicSetup/contactCustomerService'],resolve),
				meta: {
					title: '联系客服',
					activeMenu: '/basicSetup/contactCustomerService',
				},
			},
			{
				path: 'memberInterest',
				name: 'memberInterest',
				component:resolve=>require(['@/views/basicSetup/memberInterest'],resolve),
				meta: {
					title: '会员权益',
					activeMenu: '/basicSetup/memberInterest',
				},
			},
			{
				path: 'share',
				name: 'share',
				component:resolve=>require(['@/views/basicSetup/share'],resolve),
				meta: {
					title: '分享码背景图',
					activeMenu: '/basicSetup/share',
				},
			},
		]
	},
	// 404 page must be placed at the end !!!
	{
		path: '*',
		redirect: '/404',
		hidden: true
	}
]

export const asyncRoutes = [

	// 404 page must be placed at the end !!!
	{
		path: '*',
		redirect: '/404',
		hidden: true
	}
]
const createRouter = () => new Router({
	// mode: 'history', // require service support
	scrollBehavior: () => ({
		y: 0
	}),
	routes: constantRoutes
})

const router = createRouter()

// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
	const newRouter = createRouter()
	router.matcher = newRouter.matcher // reset router
}

export default router
